define(['app'], function(app) {
	'use strict';

	var controller = function controller($scope, Branddetail, $stateParams, Auth) {
		
		$scope.brand_id = $stateParams.id;
		
		//初始化数据
		$scope.init_data = function(){
			$scope.user_type = Auth.check_user_type();//1:制造商，2:品牌代理商，3:代理商/分仓	4:经销商
			Branddetail.detail($scope.brand_id,function(data){
				$scope.detail = data.result;
			})
		}
		$scope.init_data();	
		
	}

	controller.$inject = ['$scope', 'Branddetail', '$stateParams', 'Auth'];
	
	return app.registerController("branddetailctrl",controller);
});